package com.gtja.beoms.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * 用于返回WorkMessage的信息，并且根据toListType有着不同聊天的对象名字&id
 * @author GHao
 * @date 2021/10/19
 */
public class QwWorkMessageWithTolistInfoDTO {

    private String fromName;

    private String fromUserCode;

    private String fromType;

    private String userCode;

    private String tolistName;

    private String tolistUserCode;

    /**
     * 企业表ID （mc_corp.id）
     */
    private String corpId;

    /**
     * 企业的名字
     */
    private String corpName;

    /**
     * 消息的seq值，标识消息的序号
     */
    private Integer seq;

    /**
     * 消息唯一标识
     */
    private String msgId;

    /**
     * 消息动作，0.send(发送消息) 1.recall(撤回消息) 2.switch(切换企业日志)
     */
    private String action;

    /**
     * 群ID
     */
    private String roomId;

    /**
     * 消息发送方id。同一企业内容为userid，非相同企业/机器人为external_userid
     */
    private String fromId;

    /**
     * 消息接收方列表，可能是多个，同一个企业内容为userid，非相同企业为external_userid
     */
    private String tolist;

    /**
     * 接收方类型 0通讯录 1外部联系人 2群
     */
    private String tolistType;

    /**
     * 文本消息类型，包括text、image、...
     */
    private String msgType;

    /**
     * 文本内容：详细见wx文档
     */
    private String content;

    /**
     * 消息发送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date msgTime;

    private QwGroupWithTolistInfoDTO qwGroupDTO;

    public String getFromName() {
        return fromName;
    }

    public void setFromName(String fromName) {
        this.fromName = fromName;
    }

    public String getFromType() {
        return fromType;
    }

    public void setFromType(String fromType) {
        this.fromType = fromType;
    }

    public String getTolistName() {
        return tolistName;
    }

    public void setTolistName(String tolistName) {
        this.tolistName = tolistName;
    }

    public String getCorpId() {
        return corpId;
    }

    public void setCorpId(String corpId) {
        this.corpId = corpId;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public String getFromId() {
        return fromId;
    }

    public void setFromId(String fromId) {
        this.fromId = fromId;
    }

    public String getTolist() {
        return tolist;
    }

    public void setTolist(String tolist) {
        this.tolist = tolist;
    }

    public String getTolistType() {
        return tolistType;
    }

    public void setTolistType(String tolistType) {
        this.tolistType = tolistType;
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getMsgTime() {
        return msgTime;
    }

    public void setMsgTime(Date msgTime) {
        this.msgTime = msgTime;
    }

    public QwGroupWithTolistInfoDTO getQwGroupDTO() {
        return qwGroupDTO;
    }

    public void setQwGroupDTO(QwGroupWithTolistInfoDTO qwGroupDTO) {
        this.qwGroupDTO = qwGroupDTO;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getTolistUserCode() {
        return tolistUserCode;
    }

    public void setTolistUserCode(String tolistUserCode) {
        this.tolistUserCode = tolistUserCode;
    }

    public String getFromUserCode() {
        return fromUserCode;
    }

    public void setFromUserCode(String fromUserCode) {
        this.fromUserCode = fromUserCode;
    }

    public String getCorpName() {
        return corpName;
    }

    public void setCorpName(String corpName) {
        this.corpName = corpName;
    }

    @Override
    public String toString() {
        return "QwWorkMessageWithTolistInfoDTO{" +
                "fromName='" + fromName + '\'' +
                ", fromUserCode='" + fromUserCode + '\'' +
                ", fromType='" + fromType + '\'' +
                ", userCode='" + userCode + '\'' +
                ", tolistName='" + tolistName + '\'' +
                ", tolistUserCode='" + tolistUserCode + '\'' +
                ", corpId='" + corpId + '\'' +
                ", corpName='" + corpName + '\'' +
                ", seq=" + seq +
                ", msgId='" + msgId + '\'' +
                ", action='" + action + '\'' +
                ", roomId='" + roomId + '\'' +
                ", fromId='" + fromId + '\'' +
                ", tolist='" + tolist + '\'' +
                ", tolistType='" + tolistType + '\'' +
                ", msgType='" + msgType + '\'' +
                ", content='" + content + '\'' +
                ", msgTime=" + msgTime +
                ", qwGroupDTO=" + qwGroupDTO +
                '}';
    }
}
